import tempfile
def main():
  test = tempfile.NamedTemporaryFile()
  test.write('asdfsadfsadfsadfasdfasdfsadfsdfsadfsadfs')
  test.seek(0)
  print "\n test read", test.read()
  print test.name
  return

if __name__ == '__main__':
  main()